package c2.cross.business.ladder.rank;

import c2.cross.business.CrossBody;
import c2.cross.business.ladder.common.LadderOppoDetail;
import cate.game.pvp.ladder.common.LadderPsQuery;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class LadderDetailDo {

    public void exe(LadderRankModule ladderRankModule, LadderPsQuery query) {
        LadderOppoDetail detail = ladderRankModule.getOppoDetail(query.roleId);
        if(detail == null) {
            log.warn("天梯赛：不在榜上");
        } else {
            int rank = ladderRankModule.getRankNo(query.roleId);
            detail.rolePs = query.ps;
            ladderRankModule.getList().set(rank-1, detail);
        }
    }
}
